package com.example.spring.code.a01;

import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

import java.util.logging.Logger;

@Component
public class Component2 {

    private static final Logger log = Logger.getLogger(Component2.class.getName());

    @EventListener
    public void aaa(UserRegisteredEvent event) {
        log.info("Component2: " + event);
        log.info("发送短信");
    }
}
